package com.peza.mines.domain;

public class Field {

	private int id;
	private int xPos;
	private int yPos;
	private int prox;
	private FieldClass type;
	private boolean visible;
	
	public Field (int id, int x, int y, FieldClass type){
		this.id = id;
		this.type = type;
		this.xPos = x;
		this.yPos = y;
	}
	
	
	@Override
	public String toString() {
		return "Field [id=" + id + ", prox=" + prox + ", type=" + type + ", visible=" + visible + "]";
	}


	public int getxPos() {
		return xPos;
	}
	
	public void setxPos(int xPos) {
		this.xPos = xPos;
	}
	
	public int getYpos() {
		return yPos;
	}
	
	public void setYpos(int ypos) {
		yPos = ypos;
	}

	public FieldClass getType() {
		return type;
	}

	public void setType(FieldClass type) {
		this.type = type;
	}

	public int getProx() {
		return prox;
	}

	public void setProx(int prox) {
		this.prox = prox;
	}


	public boolean isMine(){
		return (type == FieldClass.MINE);
	}
	
	public boolean isVisible() {
		return visible;
	}


	public void setVisible(boolean visible) {
		this.visible = visible;
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}
	
	
}
